﻿<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
  <title>多语言工功能实现</title>

  <!-- Bootstrap -->
  <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

  <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->


  <style>
    .titleSpan {
      color: #f00;
      font-size: 24px;
    }
    
    .contentSpan {
      color: #111;
      font-size: 18px;
    }
  </style>
</head>

<body>
  <div class="container">
    <div style="margin:10px auto;">
      <div style="margin:10px auto;text-align: center;border-bottom: 1px solid #ddd;padding-bottom: 10px;">
        <div class="btn-group" role="group" aria-label="...">
          <button type="button" class="btn lgBtn btn-default" id="en" onclick="changeLg('en')">English</button>
          <button type="button" class="btn lgBtn btn-default" id="ch" onclick="changeLg('ch')">简体中文</button>
          <button type="button" class="btn lgBtn btn-default" id="jp" onclick="changeLg('jp')">セーター</button>
        </div>
      </div>
      <div id="lag">

        <div><span class="titleSpan">jy_name1_jy</span> </div>
        <div><span class="titleSpan">jy_name2_jy</span> </div>
        <div><span class="titleSpan">jy_name3_jy</span> </div>
        <div><span class="titleSpan">jy_name4_jy</span> </div>
        <div><span class="titleSpan">jy_name5_jy</span> </div>
        <div><span class="titleSpan">jy_name5_jy</span></div>
        <div><span class="titleSpan">jy_name5_jy</span> </div>
        <div style="margin:10px 0;"><button class="btn btn-success" id="mySubmit">jy_submitbtn_jy</button>
          </div>
        <div><img src="images/jy_image1_jy" class="img-responsive" /></div>
      </div>
    </div>
  </div>

  <script src="js/jquery-2.2.1.min.js"></script>
  <script src="js/siteLanguage.js"></script>
  <script src="js/fjy_multiLanguage.js"></script>

  <script>
    var lg = fjy_language.create({ language: language});
     function changeLg(code){
      lg.setLanguage(code);         
      window.location.reload();
    }

    $(function () {
      var languageCode=lg.getLanguage();
      $("#"+languageCode).addClass("btn-danger");
      lg.translating("lag");


      $("#mySubmit").click(function(){
       var msg=lg.getValue("jy_success_jy");
       alert(msg);
      });

    });   
  </script>
</body>

</html>